<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core">

<ui:composition template="../templates/commonClient.xhtml">
	<ui:define name="pageTitle">Title</ui:define>
	<ui:define name="pageHeader">Header</ui:define>

	<ui:define name="container">
		<h:body>
			<h:form id="form">
				<div class="row section">
				<div class="row">
					<div class="col-lg-12">
						<h1 class="page-header">
							Resultat recherche des voyage pour <small>#{frontBean.destination}</small>
						</h1>
						<ol class="breadcrumb">
							<li><a href="accueil.jsf">Accueil</a></li>
							<li class="active">Recherche voyages</li>
						</ol>
					</div>
					</div>
					<div class="row">

						<div class="col-lg-9">
							<c:forEach items="#{frontBean.listVoyage}" var="voyage">
								<hr>
									<div style="text-align: left;height:100%;">
										<div style="display:inline-block">
											<a href="blog-post.html">
												<img
												src="/voyages-web/resources/img/#{voyage.destination.toLowerCase()}/1.jpg"
												class="img-max img-responsive"
												alt="#{voyage.destination}"></img>
											</a>
										</div>
										<div style="display:inline-block;">
											<div style=" width:100%;"><label>Destination : </label>#{voyage.destination}</div>
											<div style=" width:100%;"><label>Prix : </label>#{voyage.prix}</div>
											<div style=" width:100%;"><label>Nombre de place restants : </label>#{voyage.nbrePlace}</div>
										</div>
									</div>
								</hr>
								<hr>
									<div style="text-align:justify;"><p>#{voyage.description}</p></div>
									
									<h:commandLink class="btn btn-info" action="#{frontBean.rechercherDetailVoyages()}" value="Détails">
			   							<f:setPropertyActionListener target="#{frontBean.idVoyage}" value="#{voyage.idVoyage}" />
									</h:commandLink>
								</hr>
							</c:forEach>
<!-- 							<hr> -->
<!-- 								<ul class="pager"> -->
<!-- 									<li class="previous"><a href="#">&larr; Précédent</a></li> -->
<!-- 									<li class="next"><a href="#">Suivant &rarr;</a></li> -->
<!-- 								</ul> -->
<!-- 							</hr> -->
						</div>

						<div class="col-lg-3">
							<div class="panel panel-primary">
								<div class="panel-heading"><strong>Rechercher un Voyage</strong></div>
								<div class="panel-body">
								<div class="input-group">
									<div class="form-group input-group">
										<span class="input-group-addon text-center">Destination :</span>
										<h:inputText type="text" class="form-control"
											placeholder="Destination" value="#{frontBean.destination}" />
									</div>
								</div>
								<div class="col-md-6 col-md-offset-3">
									<h:commandButton class="btn btn-success btn-block" value="Rechercher" action="#{frontBean.rechercherVoyages}" />
								</div>
								</div>
							</div>
						</div>
					</div>
				</div>

			</h:form>

		</h:body>
	</ui:define>

	<ui:define name="body">
		<form jsfc="h:form" id="Form"></form>
	</ui:define>
</ui:composition>

</html>